<?php

use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;
use Dcat\Admin\Admin;

Admin::routes();

Route::group([
    'prefix'     => config('admin.route.prefix'),
    'namespace'  => config('admin.route.namespace'),
    'middleware' => config('admin.route.middleware'),
], function (Router $router) {
    $router->any('/', 'HomeController@index');
    $router->resource('brand', 'BrandController'); //品牌管理
    $router->resource('car', 'CarController'); //汽车管理
    $router->resource('role', 'RoleController'); //角色管理
    $router->resource('workshop', 'WorkshopController'); //车间管理
    $router->resource('processes-archives', 'ProcessesArchiveController'); //工序档案管理
    $router->resource('user', 'UserController'); //用户管理
    $router->resource('user-process', 'UserProcessController'); //技师工序管理
    $router->resource('stop-reason', 'StopReasonController'); //中断原因
    $router->resource('rework-reason', 'ReworkReasonController'); //返工原因
    $router->resource('sheet-metal-component', 'SheetMetalComponentController'); //钣金部件维护
    $router->resource('spray-painting-component', 'SprayPaintingComponentController'); //喷漆部件维护
    $router->resource('order-dispatch', 'WorkOrderDispatchController'); //派工记录
    $router->any('work-order-list', 'WorkOrderController@getList');
    $router->any('work-order-export', 'WorkOrderController@export');
    $router->any('brand-list', 'HomeController@brand');
    $router->any('car-list', 'HomeController@car');
    $router->any('component-maintenance-list', 'HomeController@componentMaintenance');
    $router->any('work-order-create', 'WorkOrderController@orderCreate');
    $router->any('work-order-detail', 'WorkOrderController@orderDetail');
    $router->any('work-order-update', 'WorkOrderController@orderUpdate');
    $router->any('work-order-component-delete', 'WorkOrderComponentController@orderComponentDelete');
    $router->any('processes-archives-all', 'HomeController@processesArchivesAll');
    $router->any('technician-all', 'HomeController@technicianAll');
    $router->any('technician-list', 'WorkOrderDispatchController@technicianList');
    $router->any('service-advisor-list', 'WorkOrderDispatchController@serviceAdvisorList');
    $router->any('work-order-assign', 'WorkOrderController@assign');
    $router->any('work-order-move-back', 'WorkOrderController@moveBack');
    $router->any('work-order-rework', 'WorkOrderController@rework');
    $router->any('order-processes-archives-all', 'WorkOrderController@processesArchivesAll');
    $router->any('rework-all', 'HomeController@reworkAll');
    $router->any('stop-all', 'HomeController@stopAll');
    $router->any('work-order-stop', 'WorkOrderController@stop');
    $router->any('work-order-stop-continue', 'WorkOrderController@stopContinue');
    $router->any('work-order-settlement', 'WorkOrderController@settlement');
    $router->any('work-log-all', 'WorkOrderController@workLogAll');
    $router->any('operation-log-all', 'WorkOrderController@operationLogAll');
    $router->any('photo-log-all', 'WorkOrderController@photoLogAll');
    $router->any('rework-stop-log-all', 'WorkOrderController@reworkStopLogAll');
    $router->any('work-order-delete', 'WorkOrderController@orderDelete');
});
